import request from "@/utils/request";

// 获取学生列表 分页
export function userList(data) {
  return request({
    url: `user/userList?pageNumber=${data.pageNumber}&pagesize=${data.pagesize}`,
    method: "get",
  });
}

// 添加学生信息
export function addStudent(data) {
  return request({
    url: "user/addStudent",
    data: data,
    method: "post",
  });
}

export function deleteStu(id) {
  return request({
    url: `user/deleteStudent?id=${id}`,

    method: "post",
  });
}

export function updateStu(data) {
  return request({
    url: "user/updateStudent",
    data: data,
    method: "post",
  });
}

export function getInfo(id) {
  return request({
    url: `user/getStudentInfo?id=${id}`,
    method: "get",
  });
}

// 模糊查询学生列表
export function searchStudent(data) {
  return request({
    url: "user/search",
    data: data,
    method: "post",
  });
}